package cate.game.role.bag.kitchenware;

import cate.common.table.d.GDBag;
import cate.common.table.d.GDObj;
import cate.common.table.item.kitchenware.row.KitchenwareBaseRow;
import cate.game.role.Role;
import cate.game.role.bag.BagContainer;
import cate.game.role.bag.item.msg.ItemAddResp;
import cate.game.role.bag.kitchenware.msg.KitchenwareAddResp;
import easy.java.dev.note.NoteClass;

@NoteClass("厨具背包")
public class KitchenwareBag extends BagContainer<Kitchenware> {
    public KitchenwareBag(){

    }

    public KitchenwareBag(Role role){
        super(role);
    }

    @Override
    protected int calcCapacity() {
        return GDBag.Capcity.KITCHENWARE;
    }

    @Override
    protected ItemAddResp createItemAddMsg() {
        return new KitchenwareAddResp();
    }

    @Override
    protected Kitchenware createItem(int tid, long num) {
        return new Kitchenware(role, tid, num);
    }

    @Override
    protected byte getItemType() {
        return GDObj.Type.KITCHENWARE;
    }

    @Override
    public KitchenwareBaseRow getItemTpl(int tid) {
        return role.getGame().table.kitchenware.base.get(tid);
    }
}
